package com.site.service.impl;

import com.night.common.entity.logistical.Dormitory;
import com.site.mapper.DormitoryMapper;
import com.site.service.DormitoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: DormitoryImpl
 * @author: LJC
 * @date: 2022/10/19-16:34
 */
@Service
public class DormitoryServiceImpl implements DormitoryService {
    @Autowired
    private DormitoryMapper dormitoryMapper;
    public List<Dormitory> getAll() {
//        List<Dormitory> objects = new LinkedList<>();
//        objects.add(new Dormitory());
        return dormitoryMapper.getAll();
    }

    //添加宿舍信息
    @Override
    public void addDormitory(Dormitory dormitory) {
        dormitoryMapper.addDormitory(dormitory);
    }

    //修改宿舍信息
    @Override
    public void updateDormitory(Dormitory dormitory) {
        dormitoryMapper.updateDormitory(dormitory);
    }
}
